package com.taomeng.service;

import com.taomeng.entity.LeaveApplication;
import com.taomeng.entity.LeaveApplicationDetail;
import com.taomeng.entity.LeaveApplicationInfo;
import com.taomeng.entity.PageBean;

import java.util.List;
import java.util.Map;

public interface LeaveService {
    /**
     * 插入请假信息
     * @param leaveApplication 请假信息
     * @return 成功
     */
    boolean add(LeaveApplication leaveApplication);
    /**
     * 根据分页信息查询请假信息
     * @param page  页码
     * @param limit 每页查几个
     * @param key   模糊查询关键字
     * @return  请假信息的map集合
     */
    PageBean<LeaveApplicationInfo> findAllByPage(int page, int limit, String status);


    Integer audit(int id, long teacherId, String opinion, int result);
    List<LeaveApplicationDetail> findDetailByApplicationId(Integer applicationId);

    List<LeaveApplication> findApplicationByStudentId(Integer id);

    List<LeaveApplication> findBacklogApplication(Integer id);

    Map<String,Object> findApplicationInfoById(int id,String studentNum);

    boolean studentBack(Integer applicationId);
}
